<?php

namespace App\Http\Controllers\Admin;

use App;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class UploadController extends Controller
{
    public function index(){
        return upload('file','upload');//上传到/web/upload
    }
    public function editormd(){
        $data=upload('editormd-image-file','upload/editormd');//上传到/web/upload
        return ['success'=>$data['code']==200 ?1 :0,'message'=>$data['msg'],'url'=>isset($data['data']['path']) ? $data['data']['path'].$data['data']['new_name']:''];
    }

}
